Note

We've changed this course a bit, so the videos don't match the lessons exactly. We've still included them for your reference. We will update them later in 2025.

Learning Objectives

After completing this lesson, you'll be able to:

Resources

What Are Attributes?

FME Workbench supports two types of attributes:

User attributes are attributes that store a specific type of data about a feature, such as a number, date, or piece of text. They might be called parcel_identifierowner_name, or date_surveyed, for example. User attributes are always part of the feature no matter which format they are stored in and hence persist when translating from one format to another. User attributes may come from a source dataset or may be created as needed within FME. Not all formats accept user attributes, and the ones that do sometimes put restrictions on them. Each user attribute is defined by its name, data type, width, and number of decimal places. FME uses the term user attribute when some relational databases might use the term column or field.

Format attributes are specific to a format's schema. Some examples are autocad_block_name and sde30_justification. FME does not generically support them and will change or be dropped when translated into a different format. In general, format attributes are designed for translations to and from the same format, although advanced users may find them helpful in writing to other formats when using customized workspaces.

Note

Warning: avoid naming user attributes with the prefix fme_. FME may not recognize a user attribute prefixed with fme_ because FME uses this prefix to process many format attributes. Also, avoid naming user attributes with the same names as other format attributes to prevent similar conflicts.

A particular set of format attributes has the prefix fme_. These attributes represent the data as it is perceived by FME and are known as FME attributes. Transformers often use these attributes; you will typically not set their values yourself. One common FME attribute worth knowing about is fme_feature_type, which stores the name of features' feature type.

User and format attributes are most visible when viewing a dataset in the Feature Information window.

Viewing attributes in the Feature Information Window

Exposed and Unexposed Attributes

In the feature type dialog of a reader or writer, attributes can be Exposed or made "visible."

Exposed checkbox on reader feature type

Exposed attributes from a reader feature type become part of the workspace, which means you can access them in transformers and set them to particular values. By default, user attributes are exposed because, in most cases, you will be primarily interested in working with those attributes in a workspace. Format attributes are usually unexposed; however, for advanced users, exposing format attributes allows a variety of special things to be done with formats, such as setting line thickness, creating entities, and setting particular bits or bytes. For more information, see Controlling Features with Format Attributes.

In addition to format attributes, unexposed attributes can originate from dynamic workflows or when working with JSON or XML data. For example, this article in the FME Community discusses dealing with attributes unknown to the schema in a dynamic workflow. Some transformers, such as XMLFlattener, have settings to expose attributes.

When viewing attributes in the Feature Information window, exposed attributes show their FME Data Types; unexposed attributes do not.

Note

Learn more about how FME handles schema.

Manage Your Attributes

Many of the top 30 transformers are support transformers for managing attributes. These create new attributes, rename them, set values, and delete them.

An essential use for these transformers is to rename attributes for schema mapping.

The main attribute-management tasks and the transformers that can be used are as follows:

Task Transformers
Create Attributes AttributeCreator, AttributeManager
Set Attribute Values AttributeCreator, AttributeManager
Remove Attributes AttributeKeeper, AttributeManager, AttributeRemover, BulkAttributeRemover
Rename Attributes AttributeManager, AttributeRenamer, BulkAttributeRenamer
Copy Attributes AttributeCopier, AttributeCreator, AttributeManager
Sort Attributes AttributeManager
Change Attribute Case BulkAttributeRenamer
Add Prefixes/Suffixes BulkAttributeRenamer

Note

Understand the BulkAttributeRenamer. It changes the case - or adds suffixes/prefixes - to the attribute namenot the attribute value.

Many of these transformers can carry out similar operations, and you can see that the AttributeManager does so many tasks you can use it almost exclusively.

However, it's important to note that the AttributeManager is a general-purpose tool. Using transformers with more specific functions, e.g., the AttributeRenamer, can boost performance. The only time AttributeManager tends to be faster than individual function attribute transformers is when you need to undertake many different attribute transformations in a row. Then, the AttributeManager is more performant.

Using transformers with more specific functions, like the AttributeRenamer instead of an AttributeManager to only do renaming, can also make your workspace easier to understand at a glance.

Note

See this blog post by FME user Aurélien Chaumet for more information on attribute transformer performance.

Note

The AttributeManager and AttributeCreator transformers let you manage the data types of your attributes. Check out this video to learn more.

Exercise

Jennifer

City councilors have voted to amend noise control laws, and residents living in affected areas must be informed of these changes.

Jennifer has been tasked with finding the affected addresses. There's a tight deadline, and at least three city councilors are watching her work. The pressure is on, and it's up to her to deliver!

Jennifer knows that the address database for the city is stored in an Esri Geodatabase whose schema matches the Local Government Information Model PostalAddress table.

However, she was told that the software used to carry out automated bulk mailings requires addresses stored in an Excel spreadsheet using a completely different schema.

So, her first task is to plan out a workspace that converts addresses from Geodatabase to Excel, mapping the schema at the same time.

Here are the general schema changes she needs to make:

1) Open Starting Workspace

She opens the starting workspace (C:\FMEData\Workspaces\TransformAttributes\attribute-managing-transformers.fmw) in FME Workbench (2025.0.1 or later).

2) Place Transformers

She has already planned out some of the workspace. Now she will place the transformers in the Transformer Options bookmark in the workspace based on their functionality.

If she is unsure what each transformer does, she refers to the FME Help by double-clicking the transformer and then clicking the Help button to read how it works.

3) Your Turn

Help Jennifer out by dragging the transformers into place. No need to configure them yet; we'll do that in later lessons.

Note that there are more transformers than you will need, and while you could accomplish some of the steps with multiple transformers, each one has a specific one in mind. If you think you can combine steps using an AttributeManager without changing the order of operations, feel free to do so.

Note

Note that Jennifer is removing attributes first. While it probably doesn't matter in this small workspace, performance will generally be better if you remove unnecessary features and attributes early in the workspace. We discuss this topic more in the Optimize Workspace Performance course.